<%@ include file="base.jsp" %>
<%
	String sService = "Single signon";
	if ("icontact".equalsIgnoreCase((String)session.getAttribute("Service")))
		sService = "Contact";
	else if ("ilink".equalsIgnoreCase((String)session.getAttribute("Service")))
		sService = "Forwarding";	
%>

<html>
<head>
	<SCRIPT LANGUAGE="JavaScript">
	<!--
		javascript:window.history.forward(1);
		
		function change_bg(cell)
		{
			cell.className="cell-mouseover";
			document.getElementById(cell).style.backgroundImage ='url(' + "<%=imagePath%>/left-menu-middle-grey.gif" + ')';
		}
		function outset(cell)
		{
			cell.className ="white-smalltext";
			document.getElementById(cell).style.backgroundImage ='url(' +"<%=imagePath%>/left-menu-middle.gif" +')';
		}
	//-->
	</SCRIPT>

<meta content="text/html; charset=UTF-8" http-equiv="content-type">

<title><bean:message key="ibroker.customization.title" /></title>
<link rel="stylesheet" type="text/css" href="<%=oStylesheet%>" />
</head>

<body>
<table cellspacing=25 border=0 cellpadding=0>
	<tr>
		<td width=50 height=120 align=right valign=bottom><img src="<%=imagePath%>/1.jpg" /></td>
		<td height=120><img src="<%=logoPath%>?<%=dt.getTime()%>" width="120" height="120" /></td>
		<td height=120 width=605 colspan=2><img
			src="<%=bannerPath%>?<%=dt.getTime()%>" height=120 width=605 /></td>
		<td width=50 height=120 align=left valign=bottom><img src="<%=imagePath%>/2.jpg" /></td>
	</tr>
	<tr>
		<td width=50 height=120 align=right valign=top><img src="<%=imagePath%>/3.jpg" /></td>
		<td valign=top>
		<table border=0 cellspacing=0 cellpadding=0 width=100%>
			<tr>
				<td id="td0" height="20px" background="<%=imagePath%>/left-menu-top.gif" ></td>
			</tr>
		<%
			// Separate Links
			int len = 0;
			if (((String) session.getAttribute("Links")).indexOf(',') > -1)
			{
				String links[] = ((String) session.getAttribute("Links")).split(", ");
	            len = links.length;
	            for (int i=1; i<(len+1); i++)
	            {
	            	String name[] = links[i-1].split("=");
		%>
					<tr>
						<td id="td<%=i%>" background="<%=imagePath%>/left-menu-middle.gif"
							width="120" height="32px" class="white-smalltext"
							onmouseover="change_bg('td<%=i%>');" onmouseout="outset('td<%=i%>');">&nbsp;&nbsp;
							<a class="link-nounderline white-smalltext" href="<%=name[1]%>"><%=name[0]%></a>
						</td>
					</tr>
		<%
				}
			}
			else
			{
				if (((String) session.getAttribute("Links")).length()>0)
				{
					len = 1;
					String name[] = ((String) session.getAttribute("Links")).split("=");
		%>
					<tr>
						<td id="td1" background="<%=imagePath%>/left-menu-middle.gif"
							width="120" height="32px" class="white-smalltext"
							onmouseover="change_bg('td1');" onmouseout="outset('td1');">&nbsp;&nbsp;
							<a class="link-nounderline white-smalltext" href="<%=name[1]%>"><%=name[0]%></a>
						</td>
					</tr>
		<%
				}
			}
			if (len<8)
			{
				for (int j=len+1; j<9; j++)
				{
		%>
					<tr>
						<td id="td<%=j%>" background="<%=imagePath%>/left-menu-middle-blank.gif"
							width="120" height="32px">
						</td>
					</tr>
		<%
				}
			}
		%>
			
			<tr>
				<td id="td9"><img src="<%=imagePath%>/left-menu-bottom.gif" width="120"></td>
			</tr>
		</table>
		</td>
		<td width=290 height=272 valign=top>
			<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
				<tr height="45px">
					<td height="45px" width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
					<td height="45px" bgcolor="#999999" align="left" valign="middle">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td align="left">
									<img src="<%=imagePath%>/title_manager_home.gif">
								</td>
								<td align="right">
									<html:link action="Logout">
										<img src="<%=imagePath%>/button-logout.jpg" border="0" align="right"/>
									</html:link>
								</td>
							</tr>
						</table>
					</td>
					<td height="45px" width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
				</tr>
				<tr height="182px">
					<td width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
					<td>
						<table cellpadding="0" cellspacing="0" width="100%" height="100%">
							<tr>
								<td width="2px" bgcolor="#CCCCCC">&nbsp;</td>
								<td bgcolor="#CCCCCC" background="<%=imagePath%>/grey-bg.gif" class="blue-smalltext">
									<bean:message key="ibroker.customization.text1" />
									<img src="<%=imagePath%>/mark-before-greeting.jpg" /><%=sService%>
									<img src="<%=imagePath%>/mark-after-greeting.jpg" />
									<bean:message key="ibroker.customization.text2" />
								</td>
								<td width="2px" bgcolor="#CCCCCC">&nbsp;</td>
							</tr>
						</table>
					</td>
					<td width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
				</tr>
				<tr height="40px">
					<td width="10px" bgcolor="#999999"></td>
					<td bgcolor="#CCCCCC"></td>
					<td width="10px" bgcolor="#999999"></td>
				</tr>
				<tr height="10px">
					<td colspan="3" bgcolor="#999999"></td>
				</tr>
			</table>
		<br><br>
		</td>
		<td background="<%=imagePath%>/grey-bg.gif" width=280 height=272 valign=top><img
			src="<%=relatedNewsPath%>?<%=dt.getTime()%>" width=280 height=300 /><br>
		</td>
		<td width=50 height=120 align=left valign=top><img src="<%=imagePath%>/4.jpg" /></td>
	</tr>
	<tr>
		<td colspan=5>
		<table width=800 cellspacing=0 cellpadding=0>
			<tr>
				<td width=50>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td align=right valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<img src="<%=imagePath%>/1-small.jpg" />
				</td>
				<td align=center valign="middle">
					<html:link styleClass="link-nounderline" action="UploadLogoForm">
						<img src="<%=imagePath%>/change-logo.jpg" border="0"/>
					</html:link>
				</td>
				<td align=right valign="middle">
					<img src="<%=imagePath%>/2-small.jpg" />
				</td>
				<td align=center valign="middle">
					<html:link styleClass="link-nounderline" action="UploadBannerForm">
						<img src="<%=imagePath%>/change-services-banner.jpg" border="0"/>
					</html:link>
				</td>
				<td align=right valign="middle">
					<img src="<%=imagePath%>/3-small.jpg" />
				</td>
				<td align=center valign="middle">
					<html:link styleClass="link-nounderline" action="UploadLinksForm">
						<img src="<%=imagePath%>/change-links.jpg" border="0"/>
					</html:link>
				</td>
				<td align=right valign="middle">
					<img src="<%=imagePath%>/4-small.jpg" />
				</td>
				<td align=center valign="middle">
					<html:link styleClass="link-nounderline" action="UploadRelatedNewsForm">
						<img src="<%=imagePath%>/change-related-news.jpg" border="0"/>
					</html:link>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td colspan=3><hr></td>
	</tr>
</table>
</body>
</html>
